#!/bin/bash

export PATH=$PATH:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/java/latest/bin:/usr/java/latest/jre:/root/bin

mongo_login_30003="/usr/bin/mongo localhost:30003/admin -u xudalei -p Mg*BxsuxkNIW6cAfIEwM"
mongo_login_40003="/usr/bin/mongo localhost:40003/admin -u xudalei -p Mg*BxsuxkNIW6cAfIEwM"

echo "db.runCommand({logRotate:1})" | ${mongo_login_30003}
echo "db.runCommand({logRotate:1})" | ${mongo_login_40003}
